package com.googlecode.sc2dm.server.sender;

/**
 * @Author Jarle Hansen (jarle@jarlehansen.net)
 * Created: 4:27 PM - 9/28/11
 */
public class MessageData {
    private final String message;
    private final String registrationId;

    public MessageData(String message, String registrationId) {
        this.message = message;
        this.registrationId = registrationId;
    }

    public String createMessageString() {
        StringBuilder content = new StringBuilder();
        content.append("registration_id=").append(registrationId);
        content.append("&collapse_key=").append(System.currentTimeMillis()).append("&data.msg=").append(message);

        return content.toString();
    }
}
